//
//  M_MineHuoBiViewController.m
//  Model
//
//  Created by apple on 2018/9/6.
//  Copyright © 2018年 apple. All rights reserved.
//

#import "M_MineHuoBiViewController.h"

@interface M_MineHuoBiViewController ()
@property (nonatomic, strong) UIImageView *rootImgView;//背景图片
@property (nonatomic, strong) UITextField *moneyTF;//输入金额
@property (nonatomic, strong) UIButton *weiXinBtn;//微信
@property (nonatomic, strong) UIButton *zhiFuBaoBtn;//支付宝
@end

@implementation M_MineHuoBiViewController
- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:NO animated:NO];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"充值货币";
    [self creationView];
    // Do any additional setup after loading the view.
}
- (void)creationView{
    self.rootImgView = [[UIImageView alloc] init];
    [self.view addSubview:self.rootImgView];
    [self.rootImgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view);
        make.top.equalTo(self.view);
        make.right.equalTo(self.view);
        make.bottom.equalTo(self.view);
        
    }];
    self.rootImgView.image = [UIImage imageNamed:@"timg4"];
    self.rootImgView.userInteractionEnabled  = YES;
    UIView *lineView = [[UIView alloc] init];
    [self.rootImgView addSubview:lineView];
    [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view);
        make.top.equalTo(self.view).with.offset(90);
        make.right.equalTo(self.view);
        make.height.offset(1);
        
    }];
    lineView.backgroundColor = [UIColor whiteColor];
    
    self.moneyTF = [[UITextField alloc] init];
    [self.rootImgView addSubview:self.moneyTF];
    [self.moneyTF mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(lineView.mas_top).with.offset(-12);
        make.left.equalTo(self.view).with.offset(12);
        make.right.equalTo(self.view).with.offset(-12);
    
        
    }];
    self.moneyTF.placeholder = @"请输入充值金额";
    UIColor *color = [UIColor whiteColor];
    self.moneyTF.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.moneyTF.placeholder attributes:@{NSForegroundColorAttributeName: color}];
    self.moneyTF.textAlignment = NSTextAlignmentCenter;
    self.moneyTF.font = [UIFont systemFontOfSize:15];
    self.moneyTF.textColor = [UIColor whiteColor];

    UIImageView *footImgView = [[UIImageView alloc] init];
    [self.rootImgView addSubview:footImgView];
    [footImgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self.view);
        make.left.equalTo(self.view);
        make.right.equalTo(self.view);
        make.height.offset((KIsiPhoneX?65:50));
        
    }];
    footImgView.image = [UIImage imageNamed:@"bg_chongzhi"];
    UIView *lineView1 = [[UIView alloc] init];
    [footImgView addSubview:lineView1];
    [lineView1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(footImgView);
        make.bottom.equalTo(footImgView);
        make.centerX.equalTo(footImgView);
        make.width.offset(1);
        
    }];
    lineView1.backgroundColor = [UIColor whiteColor];
    self.weiXinBtn = [[UIButton alloc] init];
    [footImgView addSubview:self.weiXinBtn];
    [self.weiXinBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view);
        make.top.equalTo(footImgView);
        make.bottom.equalTo(footImgView);
        make.width.offset(DEF_SCREEN_WIDTH/2);
        
    }];
    [self.weiXinBtn setTitle:@"微信充值" forState:UIControlStateNormal];
    [self.weiXinBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    self.weiXinBtn.titleLabel.font = [UIFont systemFontOfSize:20];
    
    
    self.zhiFuBaoBtn = [[UIButton alloc] init];
    [footImgView addSubview:self.zhiFuBaoBtn];
    [self.zhiFuBaoBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.view);
        make.top.equalTo(footImgView);
        make.bottom.equalTo(footImgView);
        make.width.offset(DEF_SCREEN_WIDTH/2);
        
    }];
    [self.zhiFuBaoBtn setTitle:@"支付宝充值" forState:UIControlStateNormal];
    [self.zhiFuBaoBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    self.zhiFuBaoBtn.titleLabel.font = [UIFont systemFontOfSize:20];
    
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
